#include <iostream>
using namespace std;

char* deletecharfromstr(char *sourse)
{

	int charcount[256]={0};
	int len=strlen(sourse);
	char *newstr=new char[len+1];
    memset(newstr,0,len+1);
	charcount[sourse[0]]=1;
	newstr[0]=sourse[0];
	int k=1;
	for (int i=1;i<len;i++)
	{
		if (charcount[sourse[i]]!=1)
		{
			newstr[k++]=sourse[i];
			charcount[sourse[i]]=1;
		}
	}
	newstr[k]='\0';
	return newstr;
}

//int main()
//{
//	char s[]="deefd";
//	char *s1=deletecharfromstr(s);
//	cout<<s1<<endl;
//}